package priv.conceit.sc.hoxton.interior.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import priv.conceit.sc.hoxton.common.entity.file.qo.FileUploadQO;
import priv.conceit.sc.hoxton.common.web.WebResponse;
import priv.conceit.sc.hoxton.common.web.feign.ErrorDecoderConfig;
import priv.conceit.sc.hoxton.common.web.feign.TokenInterceptor;
import priv.conceit.sc.hoxton.interior.fallback.AuthClientFallback;

import javax.validation.Valid;

/**
 * sc-hoxton FileClient
 *
 * @author Conceit
 * @since 1.0.0, 2020/11/12
 */
@FeignClient(name = "sc-hoxton-file", configuration = {TokenInterceptor.class, ErrorDecoderConfig.class},fallback = AuthClientFallback.class)
public interface FileClient {

	/**
	 * upload文件上传
	 *
	 * @param fileUploadQO
	 * @return priv.conceit.sc.hoxton.common.util.RestfulResponse
	 * @author conceit
	 * @date 2020/4/27 15:21
	 */
	@PostMapping("/file/upload")
	WebResponse upload(@Valid FileUploadQO fileUploadQO);


}
